home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MPW_TOOL
/
TOOLS
/
TOOLS_WI
/
ICON_8
/
TESTS
/
PERMUTE.ICN
< prev
next >
Wrap
Text File
|
1990-03-02
|
310b
|
18 lines
procedure main()
output := set()
every 1 to 2 do
every insert(output,permute("ogram"))
every write(!output)
end
procedure permute(s)
local i, x, t
if s == "" then return ""
every i := 1 to *s do {
x := s[i]
t := s
t[i] := ""
suspend x || permute(t)
}
end